const {GET,POST,POST_TOKEN} = require('./index.js');

const login = (data)=>{ return POST('public/login',data);}

const register = (data)=>{  return POST('public/register',data);}

const getUserId = ()=>{return GET('public/getId',{});}

const getListMan = ()=>{return POST_TOKEN('public/getChatListManage',{});}

const getChatList = ()=>{return POST_TOKEN('public/getChatList',{});}

const createChat = (data)=>{return POST_TOKEN('public/createChat',data);}

const joinChat = (data)=>{return POST_TOKEN('public/joinChat',data);}

const getUserInfo = ()=>{return POST_TOKEN('public/getUserInfo',{});}

const verify = ()=>{return POST_TOKEN('public/verify',{});}

const getChatDetails = (data)=>{return POST_TOKEN('public/getChatDetails',data);}

const verifySecondKey = (data)=>{return POST_TOKEN('public/verifySecondKey',data);}

const updateChatTime = (data)=>{return POST_TOKEN('public/updateChatTime',data);}

module.exports = {
	login,
	register,
	getUserId,
	getListMan,
	getChatList,
	createChat,
	joinChat,
	getUserInfo,
	verify,
	getChatDetails,
	verifySecondKey,
	updateChatTime
}